/**
 * @ViewAdapter.as
 * 
 * @author sodaChen mail:asframe@163.com
 * @version 1.0
 * <br>Copyright (C), 2012 ASFrame.com
 * <br>This program is protected by copyright laws.
 * <br>Program Name:ASFrame AStruts2
 * <br>Date:2012-4-15
 */
package com.asframe.astruts2.mvc.view
{
	import flash.display.DisplayObjectContainer;
	import flash.display.Sprite;
	import flash.events.EventDispatcher;
	
	/**
	 * View显示对象的适配器，继续该对象的子类必须实现getContainer()方法
	 * @author sodaChen
	 * @Date:2012-4-15
	 */
	public class MvcViewAdapter implements IMvcView
	{
		/** 显示对象容器 **/
		protected var viewContainer:Sprite;
		
		public function MvcViewAdapter()
		{
			super();
		}
		public function init():void
		{
		}
		
		public function dispose(o:*=null):void
		{
			
		}
		
		public function getContainer():Sprite
		{
			if(viewContainer == null)
			{
				throw new Error("ViewAdapter的getContainer方法必须由子类重新实现，返回显示对象容器");
			}
			return viewContainer;
		}
	}
}
